<?php
    session_start();
    require_once '../includes/runtime/lib/Propel.php';
    Propel::init("../includes/build/conf/easylib-conf.php");
    set_include_path("../includes/build/classes" . PATH_SEPARATOR . get_include_path());
    $abonne = TabAbonneQuery::create()->filterByEmail($_SESSION["user_login"])->findOne();
    $utilisation = TabUtilisationQuery::create()->filterByFkAbonne($abonne->getIdAbonne())->filterByDateFin(null)->find();
    if(count($utilisation)<1)
        $utilisation=0;
    else
        $utilisation=1;
    if($utilisation->count()!=0)
        echo $utilisation->toJSON();;  
?>
